package com.zhuoli.service.springboot.distributed.repeat.submit;

import com.zhuoli.service.springboot.distributed.repeat.submit.common.keygenerator.CacheKeyGenerator;
import com.zhuoli.service.springboot.distributed.repeat.submit.common.keygenerator.impl.LockKeyGenerator;
import com.zhuoli.service.springboot.distributed.repeat.submit.common.redis.RedisConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;

/**
 * @Author: zhuoli
 * @Date: 2018/9/6 11:33
 * @Description:
 */
@SpringBootApplication
@Import(value = {RedisConfig.class})
public class AntiRepeatedSubmitApplicationContext {
    public static void main(String[] args) {
        SpringApplication.run(AntiRepeatedSubmitApplicationContext.class, args);
    }

    @Bean
    public CacheKeyGenerator cacheKeyGenerator() {
        return new LockKeyGenerator();
    }
}
